package com.jfinal.weixin.sdk.encrypt;

import com.jfinal.weixin.sdk.api.ApiConfig;
import com.jfinal.weixin.sdk.api.ApiConfigKit;

/**
 * Created by mason on 17-7-3.
 *
 */
public class MsgCryptHelper {

    public CryptConfig resolveConfig() {
        ApiConfig ac = ApiConfigKit.getApiConfig();
        return new CryptConfig(ac.getAppId(), ac.getToken(), ac.getEncodingAesKey());
    }

    public class CryptConfig {
        private String appId;
        private String token;
        private String encodingAesKey;

        public CryptConfig(String appId, String token, String encodingAesKey) {
            this.appId = appId;
            this.token = token;
            this.encodingAesKey = encodingAesKey;
        }

        public String getAppId() {
            return appId;
        }

        public String getToken() {
            return token;
        }

        public String getEncodingAesKey() {
            return encodingAesKey;
        }
    }
}
